package waal.pc.backend.dataPoints;



public class DigitalDataPoint extends DataPoint {


	private boolean value;
	
	public DigitalDataPoint( double time, boolean value) {
		this.time =  time;
		this.value = value;		
	}
	
	public double getValue() {
		if(this.value) {
			return 1;
		} else {
			return 0;
		}
	}
	
	public boolean getState() {
		return this.value;
	}
	
	@Override
	public String toString() {
		if(this.value) {
			return "Time: " + this.time + " - Value: true";
		} else {
			return "Time: " + this.time + " - Value: false";
		}
	}
}
